﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Core.Utilities;
using VOL.Entity.DomainModels;
using VOL.Smartmanufacturing.Infrastructure;
using VOL.Smartmanufacturing.IServices.WatchedPlatform;

namespace VOL.Smartmanufacturing.Services.WatchedPlatform
{

    /// <summary>
    /// 工单台账列表显示
    /// </summary>
    public class TicketsLedgerShow : ITicketsLedgerShow
    {
        private readonly IBaseRepository<TicketsLedger> _ticketsLedgerRepository;

        public TicketsLedgerShow(IBaseRepository<TicketsLedger> ticketsLedgerRepository)
        {
            _ticketsLedgerRepository = ticketsLedgerRepository;
        }
        public async Task<WebResponseContent> GetTicketsLedgerShow()
        {
            var ticketsLedgers = _ticketsLedgerRepository.GetAll();
            var response = WebResponseContent.Instance.OK("查询成功", ticketsLedgers);
            return await Task.FromResult(response);
        }
    }
}
